package com.study.model.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * The persistent class for the pur_app_details database table.
 * 
 */
@Entity
@Table(name = "pur_app_details")
@NamedQuery(name = "PurAppDetail.findAll", query = "SELECT p FROM PurAppDetail p")
public class PurAppDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name = "appdetail_id")
	private String appdetailId;

	@Column(name = "app_reason")
	private String appReason;

	@Temporal(TemporalType.DATE)
	@Column(name = "dmd_date")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date dmdDate;

	@Column(name = "dmd_quantity")
	private int dmdQuantity;

	@Column(name = "pro_id")
	private String proId;

	// bi-directional many-to-one association to PurApp
	@ManyToOne
	@JoinColumn(name = "app_id")
	private PurApp purApp;

	public PurAppDetail() {
	}

	public String getAppdetailId() {
		return this.appdetailId;
	}

	public void setAppdetailId(String appdetailId) {
		this.appdetailId = appdetailId;
	}

	public String getAppReason() {
		return this.appReason;
	}

	public void setAppReason(String appReason) {
		this.appReason = appReason;
	}

	public Date getDmdDate() {
		return this.dmdDate;
	}

	public void setDmdDate(Date dmdDate) {
		this.dmdDate = dmdDate;
	}

	public int getDmdQuantity() {
		return this.dmdQuantity;
	}

	public void setDmdQuantity(int dmdQuantity) {
		this.dmdQuantity = dmdQuantity;
	}

	public String getProId() {
		return this.proId;
	}

	public void setProId(String proId) {
		this.proId = proId;
	}

	public PurApp getPurApp() {
		return this.purApp;
	}

	public void setPurApp(PurApp purApp) {
		this.purApp = purApp;
	}

}